function findeLongestWord(str) {
    var new_str = str.split(" ");
    var arr = [];
    for(let i=0;i<new_str.length;i++){
        arr.push(new_str[i].length);
    }
    return num = arr.sort(function (a,b) {
      return b-a;
    })[0];

}

console.log(findeLongestWord("The quick brown fox jumped over the lazy dog"));